home *** CD-ROM | disk | FTP | other *** search
/ DarkBASIC - The Ultimate 3D Game Creator / PCactive 8 CD1 - DarkBasic.iso / SOFTWARE / DEMOS / DarkForge2000 / snippets_vol4 / snip_swirl.dba < prev    next >
Encoding:
Text File  |  2000-10-17  |  1.2 KB  |  65 lines

  1. `    ------------------------------------------------------------------------
  2. `    Swirl                                     DarkForge Snippet (11/10/2000)
  3. `    ------------------------------------------------------------------------
  4. `    Original code by: BigGun - dmartin@cnl.com.au - http://www.thebiggun.com
  5. `    Modify the values below for different effects. Simple but lovely.
  6. `    Good values for "something" are 25, 150 and try 1000 too!
  7.  
  8. hide mouse
  9. sync on
  10. sync rate 0
  11.  
  12. something = 150
  13. red = 255
  14. green = 255
  15. blue = 255
  16. blur = 0
  17.  
  18. autocam off
  19. backdrop on
  20. color backdrop 0
  21.  
  22. create bitmap 1,128,128
  23.  
  24. for i=1 to 1000
  25.  
  26.     ink rgb(rnd(red),rnd(green),rnd(blue)),0
  27.     dot rnd(128),rnd(128)
  28.  
  29. `    Try this but only with low "something" values
  30. `    text rnd(128),rnd(128),"SWIRL!"
  31.  
  32. next i
  33.  
  34. if blur>0 then blur bitmap 1,blur
  35. get image 1,0,0,128,128
  36. delete bitmap 1
  37.  
  38. for i=1 to 10
  39.  
  40.     make object plain i,1500,1500
  41.     xrotate object i,90
  42.     fix object pivot i
  43.     position object i,0,i,0
  44.     ghost object on i
  45.     texture object i,1
  46.  
  47. next i
  48.  
  49. position camera 0,700,0
  50. point camera 0,0,0
  51. o=1
  52.  
  53. do
  54.  
  55.     for o=1 to 10
  56.         yrotate object o,wrapvalue(sin(i-o)*something)
  57.     next o
  58.     
  59.     i=wrapvalue(i+3)
  60.     
  61.     sync
  62.  
  63. loop
  64.  
  65.